﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="personaldaydoneoverview.aspx.cs"
    Inherits="Com.Rivyer.Web.work.personaldaydoneoverview" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2.Export, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>个人完成计划统计</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">个人完成计划统计</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px">
                    <div id="rivcontent">
                        <div class="title">
                            个人完成计划统计
                        </div>

                        <dx:ASPxGridView ID="personaldoneplanoverview" runat="server" AutoGenerateColumns="False"
                            DataSourceID="SqlDataSource1" Font-Size="12px" Width="800px" 
                            KeyFieldName="id" onrowupdating="personaldoneplanoverview_RowUpdating">
                            <Columns>
                                <dx:GridViewCommandColumn VisibleIndex="0">
                                    <EditButton Text="更新" Visible="True">
                                    </EditButton>
                                    <CancelButton Text="取消">
                                    </CancelButton>
                                    <UpdateButton Text="更新">
                                    </UpdateButton>
                                </dx:GridViewCommandColumn>
                                <dx:GridViewDataTextColumn FieldName="id" VisibleIndex="1" ReadOnly="True" 
                                    Visible="False">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="日期" FieldName="createdate" VisibleIndex="2">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="姓名" FieldName="realname" Visible="False" 
                                    VisibleIndex="3">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataMemoColumn Caption="今日完成" FieldName="daydone" VisibleIndex="4">
                                    <PropertiesMemoEdit Rows="9">
                                    </PropertiesMemoEdit>
                                    <EditFormSettings RowSpan="3" />
                                </dx:GridViewDataMemoColumn>
                                <dx:GridViewDataMemoColumn Caption="明日计划" FieldName="dayplan" VisibleIndex="5">
                                    <PropertiesMemoEdit Rows="5">
                                    </PropertiesMemoEdit>
                                    <EditFormSettings RowSpan="3" />
                                </dx:GridViewDataMemoColumn>
                                <dx:GridViewDataMemoColumn Caption="问题反馈" FieldName="dayissue" VisibleIndex="6">
                                    <PropertiesMemoEdit Rows="5">
                                    </PropertiesMemoEdit>
                                    <EditFormSettings RowSpan="3" />
                                </dx:GridViewDataMemoColumn>
                            </Columns>
                            <SettingsPager AlwaysShowPager="True">
                            </SettingsPager>
                            <SettingsEditing EditFormColumnCount="1" Mode="PopupEditForm" 
                                PopupEditFormHeight="400px" PopupEditFormHorizontalAlign="Center" 
                                PopupEditFormVerticalAlign="Middle" PopupEditFormWidth="400px" />
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                            <Styles>
                                <Header HorizontalAlign="Center">
                                </Header>
                            </Styles>
                        </dx:ASPxGridView>
                        <div class="tips">Tips:</div>1.更新每日完成,明日计划不能为空!
                        <div style=" margin-top:10px">
                            <dx:ASPxButton ID="ASPxButton1" runat="server" Text="导出excel" OnClick="ASPxButton1_Click">
                            </dx:ASPxButton>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="personaldoneplanoverview"></dx:ASPxGridViewExporter>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ITConnectionString %>"
        ProviderName="System.Data.SqlClient" 
        SelectCommand="SELECT * FROM [tb_jobdoneplan] WHERE ([realname] = @realname) ORDER BY [createdate] DESC" 
        DeleteCommand="DELETE FROM [tb_jobdoneplan] WHERE [id] = @id" 
        InsertCommand="INSERT INTO [tb_jobdoneplan] ([createdate], [realname], [daydone], [dayplan], [dayissue]) VALUES (@createdate, @realname, @daydone, @dayplan, @dayissue)" 
        UpdateCommand="UPDATE [tb_jobdoneplan] SET [createdate] = @createdate, [realname] = @realname, [daydone] = @daydone, [dayplan] = @dayplan, [dayissue] = @dayissue WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="createdate" Type="String" />
            <asp:Parameter Name="realname" Type="String" />
            <asp:Parameter Name="daydone" Type="String" />
            <asp:Parameter Name="dayplan" Type="String" />
            <asp:Parameter Name="dayissue" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:SessionParameter Name="realname" SessionField="realname" Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="createdate" Type="String" />
            <asp:Parameter Name="realname" Type="String" />
            <asp:Parameter Name="daydone" Type="String" />
            <asp:Parameter Name="dayplan" Type="String" />
            <asp:Parameter Name="dayissue" Type="String" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
